//
   Created by Administrator on 2015/11/26.
extends public/pure-layout
block container
    .sorts.comWidth
        .inner-sorts.clearfix
            dl.items
                each ctg in ctgs || []
                    .sub-inner
                        dt: h2 #{ctg.name}
                        dd
                            each child in ctg.children
                                a(href="/recipe/ctg/#{child.id}") #{child.name}

    .imgs-box.comWidth(style='min-height:300px')
        if(!page)
            .return-title
                h2 菜谱精选
            .re-imgsbox
                ul.imgs-items.clearfix
                    each recipe in recipes || []
                        li: a(href="/recipe/details/#{recipe.id}")
                            img(src="#{recipe.finishedProductImage}")
                            h3: a(href="#{recipe.finishedProductImage}") #{recipe.title}
        else
            if(page.data && page.data.length>0)
                .return-title
                    h2 #{ctg.name}
                .re-imgsbox
                    ul.imgs-items.clearfix
                        each recipe in page.data || []
                            li: a(href="/recipe/details/#{recipe.id}")
                                img(src="#{recipe.finishedProductImage}")
                                h3: a(href="#{recipe.finishedProductImage}") #{recipe.title}
            else
                .text-center 改类下还没有任何菜谱~
                //include public/page_nav
            .sy-page.comWidth.text-center
                include public/page_nav